#include<stdio.h>
int main()
{
    double hao[500] = { 0 };
    float goal[500][2] = { 0 };
    int i, j, n, k;
    float max, temp;
    scanf("%d%d", &n, &k);
    for (i = 0; i < n; i++)
    {
        scanf("%lf%f", hao[i], goal[i][1]);
        goal[i][0] = i;
    }
    for (i = 0; i < n; i++)
    {
        max = goal[i][1];
        for (j = i; j < n; j++)
        {
            if (goal[j][1] > max)
            {
                temp = goal[j][1];
                max = goal[j][1];
                goal[][]
            }
        }

    }
    i = (int)goal[k - 1][0];
    printf("%lf %f", hao[i], goal[k - 1][1]);

    return 0;
}
}